<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body>
<div class="ibox-content" style="padding-right: 8%">
    <form class="form-horizontal m-t" id="signupForm">
        <input id="id" name="id" th:value="${inputs.id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-2 control-label">编号<em class="gg-star">*</em>：</label>
            <div class="col-sm-4">
                <input id="num" name="num" th:value="${inputs.num}" class="form-control"
                       type="text">
            </div>
            <label class="col-sm-2 control-label">生日：</label>
            <div class="col-sm-4">
                <input id="birthday" name="birthday"
                       th:value="${#dates.format(inputs.birthday,'yyyy-MM-dd')}"
                       class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">RFID编号：</label>
            <div class="col-sm-4">
                <input id="rfidNum" name="rfidNum" th:value="${inputs.rfidNum}" class="form-control" type="text">
            </div>

            <label class="col-sm-2 control-label">激光号：</label>
            <div class="col-sm-4">
                <input id="laserNum" name="laserNum" th:value="${inputs.laserNum}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">上代编号：</label>
            <div class="col-sm-4">
                <input id="parentNum" name="parentNum" th:value="${inputs.parentNum}"
                       class="form-control" type="text">
            </div>
            <label class="col-sm-2 control-label">批次<em class="gg-star">*</em>：</label>
            <div class="col-sm-4">
                <input id="batchNum" name="batchNum" th:value="${inputs.batchNum}"
                       class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">种类<em class="gg-star">*</em>：</label>
            <div class="col-sm-4">
                <!-- 									<input id="typeName" name="typeName" th:value="${inputs.typeName}" class="form-control" type="text"> -->
                <sys:dict type="animal_type" id="typeName" name="typeName"
                          th:value="${inputs.typeName}" class="form-control" firstValue=""
                          firstText="请选择种类"
                          onchange="base.dict.resetDict('typeName','varietyName')"/>
            </div>
            <label class="col-sm-2 control-label">品种<em class="gg-star">*</em>：</label>
            <div class="col-sm-4">
                <!-- 									<input id="varietyName" name="varietyName" th:value="${inputs.varietyName}" class="form-control" type="text"> -->
                <sys:dict type="animal_varieties" id="varietyName" name="varietyName"
                          class="form-control" th:value="${inputs.varietyName}" firstValue=""
                          firstText="请选择品种"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">最初体重：</label>
            <div class="col-sm-4">
                <input id="initWeight" name="initWeight" th:value="${inputs.initWeight}"
                       class="form-control" type="text" disabled>
            </div>
            <label class="col-sm-2 control-label">目前体重：</label>
            <div class="col-sm-4">
                <input id="curWeight" name="curWeight" th:value="${inputs.curWeight}"
                       class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">所属养殖户：</label>
            <div class="col-sm-4">
                <!-- 									<input id="deptId" name="deptId" th:value="${inputs.deptId}" class="form-control" type="text"> -->
                <sys:dict
                        th:onload="'get:system/sysDept/dict/list?cDeptId='+${session.sysUser.deptId}"
                        th:value="${inputs.deptId}" valueText="deptId" nameText="name"
                        id="deptId" name="deptId" class="form-control"
                        onchange="base.dict.resetDictByDept('deptId','spaceId')"
                        firstValue="" firstText="请选择养殖户"/>
            </div>
            <label class="col-sm-2 control-label">入住场地：</label>
            <div class="col-sm-4">
                <sys:dict
                        th:onload="'get:animal/space/dict/list?cDeptId='+${session.sysUser.deptId}"
                        th:value="${inputs.spaceId}" superValueText="deptId" valueText="id"
                        nameText="name" id="spaceId" name="spaceId"
                        class="form-control" style="" firstValue="" firstText="请选择场地"/>

            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">供应商：</label>
            <div class="col-sm-4">
                <sys:dict
                        th:onload="'get:animal/supplier/dict/list?cDeptId='+${session.sysUser.deptId}"
                        th:value="${inputs.supplierId}" superValueText="deptId" valueText="id"
                        nameText="name" id="supplierId" name="supplierId"
                        class="form-control" style="" firstValue="" firstText="请选择供应商"/>

            </div>
            <label class="col-sm-2 control-label">其他信息：</label>
            <div class="col-sm-4">
                <input id="otherInfo" name="otherInfo" th:value="${inputs.otherInfo}"
                       class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态：</label>
            <div class="col-sm-4">
                <sys:dict type="inputs_status" id="status" name="status" th:value="${inputs.status}"
                          class="form-control" firstValue="0"
                          firstText="请选择状态"/>
            </div>
            <label class="col-sm-2 control-label">录入人员：</label>
            <div class="col-sm-4">
                <input id="createUser" name="createUser"
                       th:value="${sysUsers[inputs.createUser==null?-1:inputs.createUser]?.name}"
                       class="form-control"
                       type="text" disabled>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-7 col-sm-offset-5">
                <button type="submit" class="btn btn-primary">提&nbsp;&nbsp;交</button>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" th:src="${'js/appjs/animal/inputs/edit.js?random='+#strings.randomAlphanumeric(9)}">
</script>
</body>
</html>
